<?php

namespace Diablo7\HyperfPulsar;

use Hyperf\HttpMessage\Uri\Uri;

class PulsarEndpoint
{
    /**
     * @var Uri
     */
    public $uri;

    /**
     * @var array
     */
    public $settings = [];

    public function __construct(string $url,array $settings = [])
    {
        $this->uri = new Uri($url);
        $this->settings  = $settings;
    }

    public function __call($name, $arguments)
    {
       return $this->uri->{$name}($arguments);
    }

    public function getSettings()
    {
        return $this->settings;
    }
}